home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / Educ / Higher Ed / G-M / MacPhaseExtras.sit / MacPhase Extras / Macros / Make1DSinWave.m < prev    next >
Encoding:
Text File  |  1994-05-28  |  482 b   |  21 lines  |  [TEXT/DAHN]

  1. macro !sMake 1D Sin Wave/;
  2. {    Use this macro to make an example data window.  }
  3. {    You can then use this data window in the example macros }
  4. {    or experiment with other plot types or functions. }
  5. var
  6.     longint :  dy,points;
  7.     real : r;
  8.     str255: name;
  9. begin
  10.     DisposeUnClose;
  11.     name:='Sin Wave';
  12.     points:=100;
  13.     NewData(name,1,points,0,FALSE);
  14.     for(dy,1,points)
  15.         r:=EvalNumber(dy,/,points,*,6.283);
  16.         r:=sin(r);
  17.         PutDataNumber(name,1,dy,r);
  18.     endfor;
  19.     PlotData(name,'Line Plot',TRUE);
  20. end;
  21.